1. Field of the Invention
The invention relates in general to a method for updating parametric data, and more particularly to a method for updating parametric data for use in a data management system.
2. Description of the Related Art
Advances in high technology have led to the widespread use of various network configurations, for example, computer networks and telecommunication networks, bringing people much more convenience in life. FIG. 1 shows a network management system. The network management system includes a central management system 100 and a number of client devices 130 connected to the central management system 100 through a network. Since the client devices 130 have different configurations and requirements, corresponding provisioning data are different. For example, a user A has his provisioning data stored in a data management system for the user A while a user B has her provisioning data stored in a data management system for the user B. Note that since the provisioning data records the parameters for configuration of a client device, when the requirements of a user change, the configuration of the client device can be altered by directly modifying the parameters in the client device. It is a convenience to configure the client device corresponding to the actual requirements of the user in this way.
FIG. 2 is a block diagram of a data management system 200 of a client device. The data management system 200 can be an embedded system or an open system, including a data storage device 250 and a data processing device 290. The data processing device 290 can be a central processing unit (CPU) or other hardware associated with software for data processing. In general, the provisioning data of a user can be stored in the data storage device 250. When the data management system 200 is set in operation, the data storage device 250 only needs to feed the provisioning data into the data processing device 290, and then the data management system 200 configures corresponding hardware according to the provisioning data, thereby causing the system configuration to correspond to the requirements of the client device. In the following, access to the provisioning data in the data storage device 250 is illustrated.
FIG. 3A shows a data storage device 250 in a block diagram. The data storage device 250 includes a non-volatile memory device 35 and a random access memory device 37. The non-volatile memory device 35 may be, for example, an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash erasable programmable read-only memory (flash EPROM). The random access memory device 37 generally refers to a random access memory (RAM) such as static random access memory (SRAM) or dynamic random access memory (DRAM).
For the approach generally used, the provisioning data are stored in the non-volatile memory device 35 so as to prevent data loss when the system restarts. Since the write speed of the non-volatile memory device 35 is low, at system start-up, the provisioning data stored in the non-volatile memory device 35 are read and then written into the random access memory device 37, which has a faster read/write speed. Through the connection between the random access memory device 37 and the data processing device 290, system setting and changes of various parameters are performed. When the requirements of the client device are changed, the related parameters that are stored in the random access memory device 37 can be modified, corresponding to the actual requirements. Since the data stored in the random access memory device 37 would be lost as the system shuts down, the system, for every certain time period, replaces the provisioning data stored in the non-volatile memory device 35 by writing the latest version of the provisioning data stored in the random access memory device 37 to the non-volatile memory device 35 in order to maintain the effectiveness of the provisioning data stored in the non-volatile memory device 35. Such writing operation generally operates in the background without informing the user, and does not influence other in-process operations. In this way, as the system restarts, the latest version of the provisioning data read from the non-volatile memory device 35 can be written to the random access memory device 37 for use in the system configuration. In other words, as the system starts up, the non-volatile memory device 35 provides the latest version of the provisioning data in order for the system's configuration tasks to be completed.
In practice, flash EPROM and RAM, as shown in FIG 3B, are used as the non-volatile memory device 35 and the random access memory device 37, respectively. It should be noted that flash EPROM 350 and RAM 370 have their respective check codes, for example, checksum (CS), for the determination of data correctness for the memory devices. As an example of checksum, a numerical value obtained by adding all data bits stored in the RAM 370 can be referred to as the checksum for the data. Normally, the checksum CS is updated after the data stored in the RAM 370 are modified, which ensures the consistency between the stored data and their checksum CS. However, the checksum CS will not be updated in some abnormal situation. For example, after the data stored in the RAM 370 are modified abnormally, the checksum CS will not be updated. In such case, the checksum CS of the RAM 370 will, then, be inconsistent with the checksum based on the data stored in the RAM 370. Once the system detects the inconsistency between the checksum CS of the RAM 370 and the checksum based on the data stored in the RAM 370, the system will overwrite the data stored in the RAM 370 with the provisioning data stored in the flash 350 so as to ensure the correctness of the contents of the RAM 370. As to the flash 350, a numerical value obtained from summation based on the data stored in the flash 350 can be referred to as a checksum CS. As mentioned above, the replacement of the provisioning data stored in the flash 350 is made gradually by the system in the background. In this way, on completion of the replacement, a checksum CS is computed, based on the data stored in the flash 350, and is used to replace the last checksum CS. Note that when the data stored in the RAM 370 are written to the flash 350, if the system is suddenly interrupted by, for example, power supply failure, system failure, or misoperation that the user carelessly presses a reset key to make the system restart, the updating process on the provisioning data will be interrupted. Since the updating process on the provisioning data in the flash 350 has not completed, the checksum CS of the flash 350 remains unchanged (unless the updating process is completed). In this case, when the system restarts, an abnormal situation that the summation based on the data stored in the flash 350 is not equal to the checksum CS stored in the flash 350 occurs. When the system detects the abnormal situation, the system reads the default values of the provisioning data from the flash 350, writes them to the RAM 37 and then configures the system according to the default values stored in the RAM 37. In this way, the configuration of the system is restored to the configuration according to the default values and the related setting is restored to the original factory setting. Accordingly, various parameters of the client device, such as IP address, have to be configured again. It makes a great inconvenience to the users. On the other hand, since the system frequently writes the latest version of the provisioning data to the non-volatile memory device, the frequency for updating the data stored in the non-volatile memory device is high, thus resulting in a reduction to the lifetime of the non-volatile memory device.